



class Response {
    constructor(public code: number, public msg: string, public data: any) { }
    static ok(data: any) {
        return {
            code: '20000',
            data: data,
            mesage: {
                default: '操作成功'
            }
        }
    }
    static error(code: string, msg: string) {
        return {
            code: code,
            data: null,
            mesage: {
                default: msg
            }
        }
    }
}

export default Response;